customer_file = input('Where is the customer file?')

all_customer = []


def separated_line(param):
    """
    get each line detail
    :param param: customer file each line
    :return: line detail
    """
    bulky = []
    light = []
    average = []
    goods = line.split(",")
    for good in goods:
        if good[0].upper() == 'L':
            light.append(good[1:].replace("\n", ""))
        elif good[0].upper() == 'B':
            bulky.append(good[1:].replace("\n", ""))
        elif good[0].upper() == 'A':
            average.append(good[1:].replace("\n", ""))
    return dict(light=light, bulky=bulky, average=average)


with open(customer_file) as f:
    lines = f.readlines()
    for line in lines:
        all_customer.append(separated_line(line.replace("\n", "")))
f.close()

print(all_customer)
